import sys
sys.path.append('/'.join(str.split(__file__,'\\')[:-2]))

import taichi as ti
from pyrender.render import Renderer
from pyrender.aabb_bounding import AabbBounding
from pyrender.render_frame import RendererFrame

def renderer(scene,w=1280,h=768,scale=1.6,bounding=AabbBounding):
    """
    启动渲染器
    """
    ti.init(ti.gpu)
    render = Renderer(w,h,bounding=bounding(scene))
    RendererFrame(render,scale).loop()
